
package com.trydofor.id.exec;

import com.trydofor.id.doer.shell.ArgHelp;
import com.trydofor.id.doer.shell.Command;

/**
 * @author : Shi Rongjiu (www.trydofor.com)
 */
public final class ServerCmd {
    
    private ServerCmd() {
    }
    
    /**
     * show server status
     * 
     * @return the command
     */
    public static Command serverStatus() {
        return new Command("status", "show server status");
    }
    
    /**
     * show server bounds
     * 
     * @return the command
     */
    public static Command serverBounds() {
        return new Command("bounds", "show server bounds");
    }
    
    /**
     * show server sessions
     * 
     * @return the command
     */
    public static Command listSessions() {
        return new Command("sessions", "show server sessions");
    }
    
    /**
     * show server sessions
     * 
     * @return the command
     */
    public static Command stopServer() {
        return new Command("stop", "stop the server");
    }
    
    
    /**
     * exec commands in the config-xml-file
     * 
     * @return the command
     */
    public static Command cmdsInXml() {
        Command cmd = new Command("cmdsInXml", "exec commands in the config-xml-file");
        ArgHelp arg = new ArgHelp("file");
        arg.setManual("the config file in classpath/system");
        arg.setRequired(true);
        cmd.addArgument(arg);
        return cmd;
    }
}
